import java.util.Scanner;

public class Text1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入年份：");
        int year = sc.nextInt();
        System.out.print("请输入月份：");
        int month = sc.nextInt();
        System.out.print("请输入日期：");
        int day = sc.nextInt();
        System.out.println("今天的日期是：" + year + "年" + month + "月" + day + "日");
        int daysToAdd = 100;
        int newYear = year;
        int newMonth = month;
        int newDay = day + daysToAdd;

        while (true) {
            int daysInMonth = getDaysInMonth(newYear, newMonth);
            if (newDay <= daysInMonth) {
                break;
            }
            newDay -= daysInMonth;
            newMonth++;
            if (newMonth > 12) {
                newMonth = 1;
                newYear++;
            }
        }
        System.out.println("100天后的日期是：" + newYear + "年" + newMonth + "月" + newDay + "日");
    }
    public static int getDaysInMonth(int year, int month) {
        int[] days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
        if (month == 2 && isLeapYear(year)) {
            return 29;
        }
        return days[month - 1];
    }
    public static boolean isLeapYear(int year) {
        return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
    }
}